<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;

?>
<div class="rightArea">
		<div class="screening_box">
        	<div class="page-header">
    			<h1>资源管理</h1>
		</div>
                <?php $form= ActiveForm::begin([
//                     'options' => ['class' => 'fl'],
                ])?>
                <div class="know-form">
                     <?php echo $form->field($model, 'subject')->dropDownList(['0'=>'--请选择--','数学'=>'数学','物理'=>'物理','化学'=>'化学'], ['class'=>'ui_select01'])?>
	            <?php echo $form->field($model, 'grade')->dropDownList(['0'=>'--请选择--','一年级'=>'一年级','二年级'=>'二年级','三年级'=>'三年级'], ['class'=>'ui_select01'])?> 
	            <?php echo $form->field($model, 'keywords')->textInput(['class'=>'know-form-input','placeholder'=>'请输入关键字'])?> 
                    <a href="<?php echo yii\helpers\Url::to(['user/addknow'])?>" class="btn btn-primary">添加</a>
                      <?php echo Html::submitButton('搜索',['class'=>'btn btn-primary'])?>
                </div> 
                
                 <?php ActiveForm::end()?>
                 <table width="98%"  border="0"  rules="none" align="center" style="margin-top:5px;">
                        <tr class="form-title">
                          <th>序号</th>
                          <th>资源名称</th>
                          <th>资源内容</th>
                          <th>关键字</th>
                          <th>添加时间</th>
                          <th align="center">操作</th>
                        </tr>
                        <?php
                        foreach ($data as $value):
                        ?>
                        <tr>
                          <td><?php echo $value->id;?></td>
                          <td><?=$value->title?></td>
                          <td><?=$value->content?></td>
                          <td><?=$value->keywords?></td>
                          <td><?=$value->createtime?></td>
                          <td><a href="<?php echo \yii\helpers\Url::to(['user/resourceinfo','id'=>$value->id])?>">修改</a>&nbsp;<a href="<?php echo \yii\helpers\Url::to(['user/delres','id'=>$value->id])?>">删除</a></td>
                        </tr>
                        <?php endforeach;?>
                        <tr><td colspan="3">
                            <?php
                            echo yii\widgets\LinkPager::widget(['pagination'=>$pager]);
                          ?>
                            </td></tr>
        		</table>
                    <?php 
                    if(Yii::$app->session->hasFlash('info'))
                    {
                        echo Yii::$app->session->getFlash('info');
                    }
                    ?>
                 
                    <div>
                        
                    </div>
                   
        </div>
</div>